/** @type {import('next').NextConfig} */
const nextConfig = {
  output: 'standalone',
  images: {
    domains: ['localhost'],
    unoptimized: true,
  },
  // 确保静态文件和数据文件被正确处理
  experimental: {
    outputFileTracingRoot: process.cwd(),
  },
  webpack: (config) => {
    // 暂时注释掉 sqlite3 外部依赖
    // config.externals.push({
    //   'sqlite3': 'commonjs sqlite3'
    // });
    return config;
  },
}

module.exports = nextConfig